/*
 * @Author: 颜礼田 2564217790@qq.com
 * @Date: 2024-09-07 11:15:17
 * @LastEditors: 颜礼田 2564217790@qq.com
 * @LastEditTime: 2024-09-09 14:15:38
 * @FilePath: /webServer/src/service/role/role.service.ts
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
import { Provide } from '@midwayjs/core';
import { ServicesImpl } from '../impl';
import { InjectEntityModel } from '@midwayjs/typeorm';
import { Repository } from 'typeorm';
import { Role } from '../../model/role/role';

@Provide()
export class RoleService extends ServicesImpl {
  /**
   * 覆盖实体
   */
  @InjectEntityModel(Role)
  services: Repository<Role>;

  /**
   * 重写关系
   */
  relations: Array<string>;

  constructor() {
    super();
    this.relations = ['permission', 'menus'];
  }
}
